Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 4 - Dialog Manager Reference / Dialog Manager Functions
Manipulating Items in Dialog and Alert Boxes /


SetDialogItem

CHANGED WITH THE APPEARANCE MANAGER

Sets or changes information for a dialog item.

pascal void SetDialogItem (
                     DialogPtr theDialog,
                     short itemNo,
                     short itemType,
                     Handle item,
                     const Rect *box);
theDialog
A pointer to a dialog structure.
itemNo
A number corresponding to the position of an item in the dialog box's item list resource; see FindDialogItem.
itemType
A dialog item constant identifying the item type of the item specified in the itemNo parameter. When an embedding hierarchy is established, only the kItemDisableBit constant is honored.
item
Either a handle to the dialog item specified in the itemNo parameter or, for a custom dialog item, a pointer (coerced to a handle) to an application-defined item drawing function. When an embedding hierarchy is established, the item parameter is ignored unless you pass a universal procedure pointer to an application-defined item draw function.
box
On output, the display rectangle (in local coordinates) for the item specified in the itemNo parameter. If you set the control rectangle on an item when an embedding hierarchy is present, SetDialogItem will move and resize the item appropriately for you.
DISCUSSION
The SetDialogItem function sets the item specified by the itemNo parameter for the specified dialog box. If an embedding hierarchy exists, however, you cannot change the type or handle of an item, although application-defined item drawing functions can still be set.

SEE ALSO
GetDialogItem.

WHEN THE APPEARANCE MANAGER IS NOT AVAILABLE
An embedding hierarchy cannot be established in a dialog box, so SetDialogItem honors all values passed in the item and itemType parameters.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998